import 'package:flutter_taotaoshipin/generated/json/base/json_field.dart';
import 'package:flutter_taotaoshipin/generated/json/phone_login_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class PhoneLoginEntity {
	int? id;
	@JSONField(name: "session_id")
	String? sessionId;
	@JSONField(name: "account_type")
	int? accountType;
	PhoneLoginPlay? play;

	PhoneLoginEntity();

	factory PhoneLoginEntity.fromJson(Map<String, dynamic> json) => $PhoneLoginEntityFromJson(json);

	Map<String, dynamic> toJson() => $PhoneLoginEntityToJson(this);

	PhoneLoginEntity copyWith({int? id, String? sessionId, int? accountType, PhoneLoginPlay? play}) {
		return PhoneLoginEntity()
			..id= id ?? this.id
			..sessionId= sessionId ?? this.sessionId
			..accountType= accountType ?? this.accountType
			..play= play ?? this.play;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PhoneLoginPlay {
	bool? auto;
	@JSONField(name: "drama_id")
	int? dramaId;
	int? sort;

	PhoneLoginPlay();

	factory PhoneLoginPlay.fromJson(Map<String, dynamic> json) => $PhoneLoginPlayFromJson(json);

	Map<String, dynamic> toJson() => $PhoneLoginPlayToJson(this);

	PhoneLoginPlay copyWith({bool? auto, int? dramaId, int? sort}) {
		return PhoneLoginPlay()
			..auto= auto ?? this.auto
			..dramaId= dramaId ?? this.dramaId
			..sort= sort ?? this.sort;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}